package sort.generator;

import java.util.Random;

/**
 * @author XY
 * @version 1.0
 * @date 2021/8/16 10:54
 * @Description
 */
public class ArrayGenerator {
    private ArrayGenerator(){

    }

    public static Integer[] generateRandomArray(int n,int bound){
        Integer[] arr = new Integer[n];
        Random rnd = new Random();
        for (int i = 0; i < n; i++) {
            arr[i] = rnd.nextInt(bound);
        }
        return arr;
    }
}
